﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Data.SqlClient;
using ECCSystem.EntityClass;

namespace ECCSystem.BizRule
{
	class ClsEmailTemplet
	{
		DataAccess.ClsEmailTemplet objDAMC = new ECCSystem.DataAccess.ClsEmailTemplet();
		public ClsEmailTemplet()
        { }
        //Get all MailCategory records list
        public object GetListByID(string strID)
        {
			return objDAMC.GetEmailTempletByID(strID);
        }

		public object GetListByName(string strName)
		{
			return objDAMC.GetEmailTempletByName(strName);
		}

		public string AddEmailTemplet(ArrayList objArr)
        {
			SqlTransaction objTran = ClsCommon.gObjConn.BeginTransaction();
			return objDAMC.AddEmailTemplet(objArr, objTran);
        }
		public string DeleteEmailTemplet(string strID)
        {
			return objDAMC.DeleteEmailTemplet(strID);
        }

		public string DeleteEmailTemplet(string[] strID)
		{
			SqlTransaction objTran = ClsCommon.gObjConn.BeginTransaction();
			return objDAMC.DeleteEmailTemplet(strID, objTran);
		}

		public string UpdateEmailTemplet(EmailTempletEntity objEntity)
		{
			return objDAMC.UpdateEmailTemplet(objEntity);
		}

		public string ImportExcel(ArrayList objALKindOfTempletEntity, ArrayList objALEmailTempletEntity)
		{
			SqlTransaction objTran = ClsCommon.gObjConn.BeginTransaction();
			return objDAMC.ImportExcel(objALKindOfTempletEntity, objALEmailTempletEntity, objTran);
		}
	}
}
